package com.qianchang.microfinance.view.credit.data;

import android.content.Context;

import com.dm.library.adapter.CommonAdapter;
import com.dm.library.adapter.CommonViewHolder;
import com.dm.library.widgets.OneLineLinearLayout;
import com.qianchang.microfinance.R;
import com.qianchang.microfinance.bean.AttachmentListBean;

import java.util.List;


/**
 * 版 权: 深圳市迪蒙网络科技有限公司
 * 描 述:
 * 修 改 人: zhoulai
 * 修改时间: 2017/7/13 19:02
 */


public class CompleteMaterialAdapter extends CommonAdapter<AttachmentListBean> {

    public CompleteMaterialAdapter(Context mContext, List<AttachmentListBean> beanList) {
        super(mContext, beanList, R.layout.adapter_complete_material);
    }

    @Override
    protected void convert(CommonViewHolder holder, AttachmentListBean attachmentListBean, int position) {
        OneLineLinearLayout twoLineLinearLayout = holder.getView(R.id.tll_complete_material);
        twoLineLinearLayout.setLeftContent(attachmentListBean.getName());
        if(attachmentListBean.getIsAuth() == 0){
            twoLineLinearLayout.setRightContent(mContext.getString(R.string.never_submit));
            twoLineLinearLayout.setRightTextColor(R.color.blue2EA1FF);
        }else{
            twoLineLinearLayout.setRightContent(mContext.getString(R.string.has_submit));
            twoLineLinearLayout.setRightTextColor(R.color.common_black_color_6);
        }
    }
}
